package org.anyin.gitee.cloud.center.auth.enums;

import lombok.Getter;
import org.anyin.gitee.cloud.lib.core.enums.BaseEnum;
import org.anyin.gitee.cloud.lib.core.exceptions.CommonException;

@Getter
public enum AuthExCodeEnum implements BaseEnum {
    USER_NOT_REGISTER("AUTH0001", "用户名或者密码不正确"),
    USER_PASSWORD_ERROR("AUTH0002", "用户名或者密码不正确"),
    USER_IS_DISABLE("AUTH0003", "用户名或者密码不正确"),
    ;

    private String code;
    private String text;

    AuthExCodeEnum(String code, String text) {
        this.code = code;
        this.text = text;
    }


    public CommonException getException(){
        return new CommonException(this.code, this.text);
    }
}
